﻿@{
    Layout = "../Shared/_ClassifierLayout.cshtml";
}
@using Cnm.Models.ViewModels
@using Kendo.Mvc.UI
@model CategoryViewModel

<div class="">
    <ol class="breadcrumb">
        <li>
            <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="@Url.RouteUrl("HomePage")" itemprop="url">
                    <span itemprop="title">tayninhinfo.net</span>
                </a>
            </span>
            @*<span class="delimiter">@breadcrumbDelimiter</span>*@
        </li>
        @foreach (var category in Model.CategoryBreadcrumb)
        {
            var isLastCategory = category.Id == Model.Id;
            if (isLastCategory)
            {
                <li class="active">@category.Name</li>
            }
            else
            {
                <li>
                    <a href="@Url.RouteUrl("Category", new { SeName = category.SeName })" title="@category.Name">@category.Name</a>
                </li>
            }
        }
    </ol>
</div>

<div class="classifier-ad-list">
    @(Html.Kendo().TabStrip()
          .Name("tabstrip")
          .Items(tabstrip =>
          {
              tabstrip.Add().Text("Tất cả")
                  .Selected(true)
                  .Content(@<text>
                    @Html.Partial("../Partials/_ClassifierGrid", new PostConditionViewModel { CategoryId = Model.Id })
                </text>);

              tabstrip.Add().Text("Cá nhân")
                  .Content(@<text>
                    @Html.Partial("../Partials/_ClassifierGrid", new PostConditionViewModel { CategoryId = Model.Id, TitularId = (int)TitularDesc.Personal })
                </text>);
              tabstrip.Add().Text("Công ty")
                  .Content(@<text>
                    @Html.Partial("../Partials/_ClassifierGrid", new PostConditionViewModel { CategoryId = Model.Id, TitularId = (int)TitularDesc.Company })
                </text>);
          })
    )
</div>